package cn.edu.scau.cmi.zhuangzhihong.singletonmodel;

import java.util.ArrayList;
import java.util.List;

import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.stage.Stage;

public class tellpresidentController {
	@FXML
	private Label num;
	@FXML
	private Label judge;
	@FXML
	private Button closewin;
	public void tellpresident(ActionEvent event) {
		
	List<president> leader = new ArrayList<president>();
    president lastleader = president.getInstance();
     
    leader.add(lastleader);
    int t=lastleader.gettime();
    num.setText(Integer.toString(t));
    
    if(leader.get(0)==lastleader) {
    	judge.setText("主席是毛泽东");
//    	System.out.print(1);
    }
    else judge.setText("主席是毛泽东");
	}
    
    public void shutdown(ActionEvent event) {
    	Stage stage =(Stage)closewin.getScene().getWindow();
    	stage.close();
    }
	
}
